class Response {
  constructor(data, error, errorCode) {
    if (!error) {
      this.data = data;
      this.success = true;
    } else if (!data) {
      this.error = error;
      this.errorCode = errorCode;
      this.success = false;
    }
  }
}

module.exports = Response;
